package com.tedu.egspringbootmvc.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

@Data
public class UserArticleDTO {
    @NotBlank(message ="标题数据不能为空..." )
    @Size(min = 1, max = 20 )
    @ApiModelProperty(value = "文章标题" ,required = true,example = "测试文章")
    private String title;
    @NotBlank(message = "数据不能为空....")
    @Size(min = 10, max = 500,message = "数据长度必须在10-500之间")
    @ApiModelProperty(value = "文章内容" ,required = true,example = "这是一篇测试的文章内容")
    private String content;

}
